# coding: utf-8
from common.models.user import User
from application import db


class Record(db.Model):
    __tablename__ = 'record'
    id = db.Column(db.Integer, primary_key=True)
    uid = db.Column(db.Integer,db.ForeignKey('user.id'))
    classone = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    classtwo = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    project = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    action = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    part = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    filename = db.Column(db.String(50, 'utf8mb4_0900_ai_ci'))
    time = db.Column(db.DateTime)
    creater = db.relationship('User', foreign_keys=uid)
